Skip to content

ci: pin golangci-lint and align local lint with CI diff filter#515

Merged
skevetter merged 1 commit into
mainfrom
fix/lint-ci-parity
Jun 23, 2026
Merged

ci: pin golangci-lint and align local lint with CI diff filter#515
skevetter merged 1 commit into
mainfrom
fix/lint-ci-parity

Conversation

@skevetter

@skevetter skevetter commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Local lint and CI lint disagreed because of two things, both addressed here:

  1. Version drift. Pre-commit pinned golangci-lint to v2.11.4; CI used latest (currently resolved to v2.12.2). Linter rules and thresholds shift across versions, so the same code could pass one and fail the other.
  2. No single command labeled "what CI runs." cli:lint:new was close, but the name didn't make the parity intent obvious.

Changes

  • .github/workflows/pr-ci.yml — pin golangci-lint from latest to v2.12.2. CI no longer drifts when upstream releases.
  • .pre-commit-config.yaml — bump pinned version v2.11.4 -> v2.12.2 to match CI exactly.
  • Taskfile.yml — replace cli:lint:new with cli:lint:ci (clearer name, same command). Run task cli:lint:ci for an explicit "did I match CI?" check.

Why no --new-from-rev in pre-commit

Initially attempted, but actions/checkout@v6 defaults to a shallow fetch that doesn't include origin/main, so --new-from-rev=origin/main couldn't resolve in the precommit job and golangci-lint fell back to all-issues mode, surfacing 15 pre-existing unparam violations introduced by the v2.11.4→v2.12.2 detection improvements. The Taskfile target gives developers the diff-filter on demand without breaking pre-commit.

Summary by CodeRabbit

  • Chores
    • Updated linting tool versions and configurations across CI/CD and local development environments.
    • Refined development workflow tasks to align CI behavior with local linting checks.

@netlify

netlify Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 09812a5
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a3867d4cce957000811251f

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4dca7316-903b-4cc6-8390-7bc89a9271a6

📥 Commits

Reviewing files that changed from the base of the PR and between 674fb9e and 09812a5.

📒 Files selected for processing (3)
  • .github/workflows/pr-ci.yml
  • .pre-commit-config.yaml
  • Taskfile.yml

📝 Walkthrough

Walkthrough

Pins golangci-lint to v2.12.2 in the CI workflow and pre-commit config (previously using latest and v2.11.4 respectively), consolidates the --timeout flag format in pre-commit, and renames the cli:lint:new Taskfile task to cli:lint:ci with an updated description.

Changes

golangci-lint v2.12.2 upgrade and local task rename

Layer / File(s) Summary
golangci-lint version pin and task rename
.github/workflows/pr-ci.yml, .pre-commit-config.yaml, Taskfile.yml
CI workflow pins golangci-lint-action to v2.12.2 instead of latest; pre-commit bumps rev from v2.11.4 to v2.12.2 and merges --timeout and 10m into --timeout=10m; Taskfile renames cli:lint:new to cli:lint:ci with an updated description while keeping the same underlying command.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • devsy-org/devsy#84: Modifies the same golangci-lint setup in .github/workflows/pr-ci.yml.
  • devsy-org/devsy#300: Changes golangci-lint configuration and job wiring in .github/workflows/pr-ci.yml.

Suggested labels

size/m

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: pinning golangci-lint version and aligning local linting with CI behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify

netlify Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 09812a5
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a3867d4c647010008312f68

Pre-commit pinned an older golangci-lint (v2.11.4) and ran without the
diff filter that CI applies, so violations introduced by a patch could
pass locally and fail in CI. Match versions, mirror the
--new-from-rev=origin/main filter in the hook, and rename the Taskfile
target to cli:lint:ci so "did I match CI?" is a single command.
@skevetter
skevetter force-pushed the fix/lint-ci-parity branch from 7ddf0c8 to 09812a5 Compare June 21, 2026 22:38
@skevetter
skevetter marked this pull request as ready for review June 22, 2026 19:55
@skevetter
skevetter merged commit 54d7708 into main Jun 23, 2026
58 checks passed
@skevetter
skevetter deleted the fix/lint-ci-parity branch June 23, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant